<form #joinOrderForm="ngForm" (ngSubmit)="_onSubmit(joinOrderForm.value)">
  <div class="col-sm-12 form-group">
    <button type="button" class="btn btn-default addterminal" [ngStyle]="{ 'margin-bottom': '5px' }" [disabled]="_type == '0'||_data.length == 3"
      (click)="_addTr()">
      <span class="glyphicon glyphicon-plus"></span>预定
    </button>
    <div class="l-table">
      <div class="table-header">
        <table class="table table-bordered table-header game-table">
          <thead>
            <tr>
              <td class="w5 text-center max-w">序号</td>
              <td class="w10 text-left max-w">类型</td>
              <td class="w10 text-left max-w">预定范围</td>
              <td class="w5 text-center max-w">操作</td>
            </tr>
          </thead>
        </table>
      </div>
      <div class="table-body">
        <table class="table table-bordered table-header game-table">
          <tbody>
            <tr *ngFor="let tr of _data;let i = index;">
              <td class="w5 text-center max-w"> {{ i + 1 }} </td>
              <td class="w10 text-left max-w">
                <select name="type" [(ngModel)]="_type" (ngModelChange)="_selectDeleteTr()">
                  <option *ngFor="let opt of [all,reserveEndDate,reserveNumber]" value="{{ opt.value }}">{{ opt.label }}</option>
                </select>
              </td>
              <td class="w10 text-left max-w">
                <input *ngIf="tr.type != 0" type="number" class="form-control" name="{{ tr.name }}" required ngModel>
                <span>{{ tr.unit }}</span>
              </td>
              <td class="w5 text-center icon-td max-w">
                <i class="glyphicon glyphicon-trash cursor" (click)="_selectDeleteTr(tr,i)" [ngStyle]="{ 'color': '#aaa', 'cursor': 'not-allowed' }"></i>
              </td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
  </div>
  <div class="modal-footer modal-footer-tongy">
    <div class="btns-group">
      <button type="button" class="btn btn-fff" data-dismiss="modal">取消
      </button>
      <button type="submit" [disabled]="joinOrderForm.invalid" class="btn btn-3a5f72">确认
      </button>
    </div>
  </div>
</form>
